<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh-CN">

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>商品检索</title>
		<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
		<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css">
		<script type="text/javascript" src="js/jQuerynew.js" ></script>
		<script type="text/javascript" src="js/bootstrapnew.min.js" ></script>
		<script type="text/javascript" charset="UTF-8" src="js/gzh/Classify.js"></script>
		
	</head>

	<body>
		<div class=" aui_state_focus" style="position: absolute; left: -9999em; top: 93px; display: block; width: auto; z-index: 1987;">
			<div class="aui_outer">
				<table class="aui_border">
					<tbody>
						<tr>
							<td class="aui_nw"></td>
							<td class="aui_n"></td>
							<td class="aui_ne"></td>
						</tr>
						<tr>
							<td class="aui_w"></td>
							<td class="aui_c">
								<div class="aui_inner">
									<table class="aui_dialog">
										<tbody>
											<tr>
												<td colspan="2" class="aui_header">
													<div class="aui_titleBar">
														<div class="aui_title" style="cursor: move; display: block;">消息</div>
														<a class="aui_close" href="#iWebShop;" style="display: block;">×</a>
													</div>
												</td>
											</tr>
											<tr>
												<td class="aui_icon" style="display: none;">
													<div class="aui_iconBg" style="background: none;"></div>
												</td>
												<td class="aui_main" style="width: auto; height: auto;">
													<div class="aui_content" style="padding: 20px 25px;">
														<div class="aui_loading"><span>loading..</span></div>
													</div>
												</td>
											</tr>
											<tr>
												<td colspan="2" class="aui_footer">
													<div class="aui_buttons" style="display: none;"></div>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
							</td>
							<td class="aui_e"></td>
						</tr>
						<tr>
							<td class="aui_sw"></td>
							<td class="aui_s"></td>
							<td class="aui_se" style="cursor: se-resize;"></td>
						</tr>
					</tbody>
				</table>
			</div>
		</div>
		<div class="container" style="min-width:420px;margin-top:10px;">
			<form action="/goods/search_result/type/radio" method="post" name="searchForm">
				<input type="hidden" name="is_products" value="0">
				<input type="hidden" name="search[type]" value="name">

				<div class="form-group">
					<div class="input-group">
						<div class="input-group-btn">
							<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span id="searchTypeText">商品名称</span> <span class="caret"></span></button>
							<ul class="dropdown-menu">
								<li>
									<a href="javascript:changeSearch('name');">商品名称</a>
								</li>
								<li>
									<a href="javascript:changeSearch('goodsid');">商品货号</a>
								</li>
							</ul>
						</div>
						<input type="text" class="form-control" name="search[content]" placeholder="输入查询信息">
					</div>
				</div>

				<div class="form-group">
					<div class="row">
						<div class="col-xs-6">
							<select class="form-control" name="search[store_nums]">
								<option value="">选择商品库存量</option>
								<option value="0">无货</option>
								<option value="9">低于10</option>
								<option value="10-100">10-100</option>
								<option value="100+">100以上</option>
							</select>
						</div>

						<div class="col-xs-6">
							<select class="form-control" name="search[is_del]">
								<option value="">选择商品状态</option>
								<option value="1">上架</option>
								<option value="0">下架</option>
							</select>
						</div>
					</div>
				</div>

				<div class="form-group">
					<div class="row">
						<div class="col-xs-6">
							<select class="form-control" name="search[commend_id]">
								<option value="">选择商品标签</option>
								<option value="新品">最新商品</option>
								<option value="特价">特价商品</option>
								<option value="热卖">热卖商品</option>
								<option value="买赠">买赠商品</option>
							</select>
						</div>
					</div>
				</div>
				<div class="form-group">
					<span id="__categoryBox"></span>
 <script>
        $(function () {
            //添加模式
            WJH_Category.DataURL="";
            WJH_Category.Init("DIV1", 0, 0, 0, true);        

        });
    </script>
						<div id="DIV1"></div>					
					<!-- <script>
						jQuery(function() {
							_goodsCategoryWidget = new categoryWidget({
								"name": "search[category_id]",
								"value": "",
								"table": "category",
								"categoryData": [{
									"id": "1",
									"name": "家用电器",
									"parent_id": "0",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}, {
									"id": "2",
									"name": "大家电",
									"parent_id": "1",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}, {
									"id": "3",
									"name": "平板电视",
									"parent_id": "2",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}, {
									"id": "4",
									"name": "食品饮料",
									"parent_id": "0",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}, {
									"id": "5",
									"name": "进口食品",
									"parent_id": "4",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}, {
									"id": "6",
									"name": "牛奶",
									"parent_id": "5",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}, {
									"id": "7",
									"name": "家具",
									"parent_id": "0",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}, {
									"id": "8",
									"name": "家装建材",
									"parent_id": "7",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}, {
									"id": "9",
									"name": "灯饰照明",
									"parent_id": "8",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}, {
									"id": "10",
									"name": "服装",
									"parent_id": "0",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}, {
									"id": "11",
									"name": "男装",
									"parent_id": "10",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}, {
									"id": "12",
									"name": "衬衫",
									"parent_id": "11",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}, {
									"id": "13",
									"name": "生活电器",
									"parent_id": "1",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}, {
									"id": "14",
									"name": "厨房电器",
									"parent_id": "1",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}, {
									"id": "15",
									"name": "电风扇",
									"parent_id": "13",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}, {
									"id": "16",
									"name": "冷风扇",
									"parent_id": "13",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}, {
									"id": "17",
									"name": "扫地机器人",
									"parent_id": "13",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}, {
									"id": "18",
									"name": "电饭煲",
									"parent_id": "14",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}, {
									"id": "19",
									"name": "微波炉",
									"parent_id": "14",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}, {
									"id": "20",
									"name": "女包",
									"parent_id": "10",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}, {
									"id": "21",
									"name": "女装",
									"parent_id": "10",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}, {
									"id": "31",
									"name": "卧室家具",
									"parent_id": "7",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}, {
									"id": "32",
									"name": "实木床",
									"parent_id": "31",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}, {
									"id": "33",
									"name": "酒品",
									"parent_id": "4",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}, {
									"id": "34",
									"name": "红酒和白酒",
									"parent_id": "33",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}, {
									"id": "35",
									"name": "母婴用品",
									"parent_id": "0",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}, {
									"id": "36",
									"name": "尿不湿",
									"parent_id": "35",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}, {
									"id": "37",
									"name": "奶粉",
									"parent_id": "35",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}, {
									"id": "38",
									"name": "玩具",
									"parent_id": "35",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}, {
									"id": "39",
									"name": "汽车道具",
									"parent_id": "0",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}, {
									"id": "40",
									"name": "保险",
									"parent_id": "39",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}, {
									"id": "41",
									"name": "装饰",
									"parent_id": "39",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}, {
									"id": "42",
									"name": "配件",
									"parent_id": "39",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}, {
									"id": "43",
									"name": "美体护肤",
									"parent_id": "0",
									"sort": "0",
									"visibility": "1",
									"keywords": null,
									"descript": null,
									"title": null,
									"seller_id": "0"
								}],
								"categoryParentData": {
									"0": [{
										"id": "1",
										"name": "家用电器",
										"parent_id": "0",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}, {
										"id": "4",
										"name": "食品饮料",
										"parent_id": "0",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}, {
										"id": "7",
										"name": "家具",
										"parent_id": "0",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}, {
										"id": "10",
										"name": "服装",
										"parent_id": "0",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}, {
										"id": "35",
										"name": "母婴用品",
										"parent_id": "0",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}, {
										"id": "39",
										"name": "汽车道具",
										"parent_id": "0",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}, {
										"id": "43",
										"name": "美体护肤",
										"parent_id": "0",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}],
									"1": [{
										"id": "2",
										"name": "大家电",
										"parent_id": "1",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}, {
										"id": "13",
										"name": "生活电器",
										"parent_id": "1",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}, {
										"id": "14",
										"name": "厨房电器",
										"parent_id": "1",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}],
									"2": [{
										"id": "3",
										"name": "平板电视",
										"parent_id": "2",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}],
									"4": [{
										"id": "5",
										"name": "进口食品",
										"parent_id": "4",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}, {
										"id": "33",
										"name": "酒品",
										"parent_id": "4",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}],
									"5": [{
										"id": "6",
										"name": "牛奶",
										"parent_id": "5",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}],
									"7": [{
										"id": "8",
										"name": "家装建材",
										"parent_id": "7",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}, {
										"id": "31",
										"name": "卧室家具",
										"parent_id": "7",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}],
									"8": [{
										"id": "9",
										"name": "灯饰照明",
										"parent_id": "8",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}],
									"10": [{
										"id": "11",
										"name": "男装",
										"parent_id": "10",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}, {
										"id": "20",
										"name": "女包",
										"parent_id": "10",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}, {
										"id": "21",
										"name": "女装",
										"parent_id": "10",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}],
									"11": [{
										"id": "12",
										"name": "衬衫",
										"parent_id": "11",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}],
									"13": [{
										"id": "15",
										"name": "电风扇",
										"parent_id": "13",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}, {
										"id": "16",
										"name": "冷风扇",
										"parent_id": "13",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}, {
										"id": "17",
										"name": "扫地机器人",
										"parent_id": "13",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}],
									"14": [{
										"id": "18",
										"name": "电饭煲",
										"parent_id": "14",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}, {
										"id": "19",
										"name": "微波炉",
										"parent_id": "14",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}],
									"31": [{
										"id": "32",
										"name": "实木床",
										"parent_id": "31",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}],
									"33": [{
										"id": "34",
										"name": "红酒和白酒",
										"parent_id": "33",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}],
									"35": [{
										"id": "36",
										"name": "尿不湿",
										"parent_id": "35",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}, {
										"id": "37",
										"name": "奶粉",
										"parent_id": "35",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}, {
										"id": "38",
										"name": "玩具",
										"parent_id": "35",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}],
									"39": [{
										"id": "40",
										"name": "保险",
										"parent_id": "39",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}, {
										"id": "41",
										"name": "装饰",
										"parent_id": "39",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}, {
										"id": "42",
										"name": "配件",
										"parent_id": "39",
										"sort": "0",
										"visibility": "1",
										"keywords": null,
										"descript": null,
										"title": null,
										"seller_id": "0"
									}]
								}
							});
						});
					</script> -->
				</div>

				<div class="form-group">
					<div class="row">
						<div class="col-xs-6">
							<div class="input-group">
								<span class="input-group-addon"><span class="glyphicon glyphicon-yen"></span></span>
								<input type="text" class="form-control" name="search[seller_price_down]" pattern="float" value="" placeholder="价格下限">
							</div>
						</div>
						<div class="col-xs-6">
							<div class="input-group">
								<span class="input-group-addon"><span class="glyphicon glyphicon-yen"></span></span>
								<input type="text" class="form-control" name="search[seller_price_up]" pattern="float" value="" placeholder="价格上限">
							</div>
						</div>
					</div>
				</div>

				<div class="form-group">
					<div class="row">
						<div class="col-xs-6">
							<div class="input-group">
								<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
								<input class="form-control" type="date" name="search[create_time_start]"  value="" placeholder="创建起始时间">
							</div>
						</div>
						<div class="col-xs-6">
							<div class="input-group">
								<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
								<input class="form-control" type="date" name="search[create_time_end]"  value="" placeholder="创建结束时间">
							</div>
						</div>
					</div>
				</div>
			</form>
		</div>

		<script type="text/javascript">
			//切换搜索条件
			function changeSearch(val) {
				$('input[name="search[type]"]').val(val);
				$('#searchTypeText').text(typeConfig[val]);
			}

			//检索方式配置
			var typeConfig = {
				"name": "商品名称",
				"goodsid": "商品货号",
				"true_name": "商户真实名称"
			};

			//表单回填

			$('#searchTypeText').text(typeConfig[$('input[name="search[type]"]').val()]);
		</script>
	</body>

</html>